Skip to content

Fix projectile strike source in Damage_PVE_Inner#161

Merged
SignatureBeef merged 5 commits intoSignatureBeef:upcomingfrom
CedaryCat:upcoming
Feb 26, 2026
Merged

Fix projectile strike source in Damage_PVE_Inner#161
SignatureBeef merged 5 commits intoSignatureBeef:upcomingfrom
CedaryCat:upcoming

Conversation

@CedaryCat
Copy link
Contributor

Align Projectile.Damage_PVE_Inner with Projectile.Damage by using ldarg_0 (the projectile instance) as the NPC strike source.

@SignatureBeef
Copy link
Owner

is this specific to 145+ ? if so can you retain previous logic where applicable
e.g. #if TerrariaServer_1450_OrAbove .. then this new logic #else existing

future versions may switch compile time logic with whatever the input binary is, so it's useful to read this information directly in the patch.

@CedaryCat
Copy link
Contributor Author

Yep — Projectile.Damage_PVE_Inner is the 1.4.5 split from Projectile.Damage, so older versions still go through the existing Projectile.Damage branch.

This fix is just correcting the strike source to ldarg_0 (the projectile); the NPC parameter there is the hit target.

And yeah, wrapping that case in a 145+ #if makes the version split much clearer in the patch.

@SignatureBeef
Copy link
Owner

apologies for the confusion @CedaryCat - i was moreso stating if this patch is only relevant to 145+ then the conditional else would need to retain the old logic too. The case itself won't matter so much as it wont be present in older versions - however, I have actually just taken a look and now understand the actual issue.

I agree with the original patch where ldarg_0/this is passed through - at the moment its invoking an instance and passing through itself incorrectly.

@CedaryCat
Copy link
Contributor Author

No problem at all!

I've just pushed a new commit to restore the original patch. Let me know if everything looks good now.

@SignatureBeef
Copy link
Owner

No problem at all!

I've just pushed a new commit to restore the original patch. Let me know if everything looks good now.

Thank you!

@SignatureBeef SignatureBeef merged commit 20d280f into SignatureBeef:upcoming Feb 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants